<?php
	try {
		$client = new SOAPClient('http://localhost:61279/WSLabManager-1.0.0/WSLabManagerService?wsdl');
		$password = hash('md5', $_POST['pass']);
		$params = array('user_name' => $_POST['user'], 'password' => $password);
		$res = $client->loginUser($params);
		$response = (array) $res->return;
		
		$code =  $response['code'];
		$message =  $response['message'];
		if($code == 0){
			session_start();
			$_SESSION['code'] = $code;
		}
		echo $code;
	} catch (Exception $e) {
		echo 50;
	}
	
?>

